/**
 * @project_name staff_vehicle
 * @package_name com.ssh.dao
 * @desc TODO
 * @param
 * @author jack
 * @date 2013-4-23
 * @time 上午9:28:04
 */
package com.ssh.dao;

import java.util.List;

import org.hibernate.SessionFactory;

import com.ssh.entity.Vehicle;

/**
 * @author jack
 *
 */
public class VehicleDAOImpl implements VehicleDAOI {

	private SessionFactory sessionFactory ;

	/* (non-Javadoc)
	 * @see com.ssh.dao.VehicleDAOI#queryVehicleByVehicleId(java.lang.String)
	 */
	@Override
	public Vehicle queryVehicleByVehicleId(String vehicleId) {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see com.ssh.dao.VehicleDAOI#updateVehicle(com.ssh.entity.Vehicle)
	 */
	@Override
	public Vehicle updateVehicle(Vehicle vehicle) {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see com.ssh.dao.VehicleDAOI#deleteVehicleByVehicleId(java.lang.String)
	 */
	@Override
	public Vehicle deleteVehicleByVehicleId(String vehicleId) {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see com.ssh.dao.VehicleDAOI#addVehicle(com.ssh.entity.Vehicle)
	 */
	@Override
	public Vehicle addVehicle(Vehicle vehicle) {
		// TODO Auto-generated method stub
		try{
			sessionFactory.getCurrentSession().merge(vehicle);
			return vehicle;
		}
		catch(Exception e){
			return null;
		}

	}

	/* (non-Javadoc)
	 * @see com.ssh.dao.VehicleDAOI#queryVehicle(java.lang.String[])
	 */
	@Override
	public List<Vehicle> queryVehicle(String... strings) {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see com.ssh.dao.VehicleDAOI#updateVehicle(com.ssh.entity.Vehicle[])
	 */
	@Override
	public int updateVehicle(Vehicle... staffs) {
		// TODO Auto-generated method stub
		return 0;
	}

	/* (non-Javadoc)
	 * @see com.ssh.dao.VehicleDAOI#deleteVehicle(java.lang.String[])
	 */
	@Override
	public int deleteVehicle(String... strings) {
		// TODO Auto-generated method stub
		return 0;
	}

	/* (non-Javadoc)
	 * @see com.ssh.dao.VehicleDAOI#addVehicle(com.ssh.entity.Vehicle[])
	 */
	@Override
	public int addVehicle(Vehicle... vehicles) {
		// TODO Auto-generated method stub
		return 0;
	}

	/**
	 * @return the sessionFactory
	 */
	public SessionFactory getSessionFactory() {
		return sessionFactory;
	}

	/**
	 * @param sessionFactory the sessionFactory to set
	 */
	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}

}
